package com.wanjia.estate.properties;

import com.wanjia.estate.utils.ThreadUtil;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.io.File;

@Data
@Configuration
@ConfigurationProperties("folder-path")
public class FolderPathProperties {

    private String filepath;
    private String pdfpath;
    private String zippath;
    private String nginxpath;

    public String getPdfpath() {
        return pdfpath + File.separator + ThreadUtil.getSlbh() + File.separator;
    }

    public String getNginxpath() {
        return nginxpath + "/" + ThreadUtil.getSlbh() + "/";
    }
}
